<?

JCAT_Package::ImportClass('JCAT_ViewGtk',JCAT::PACKAGE_MVCGTK) ;

class DataVerifier_JCATBuildin_LengthView extends JCAT_ViewGtk implements JCAT_IViewForm
{
	/**
	 * 控件基本信息
	 * 
	 * @access	public
	 * @param	$aParent=null	JCAT_ViewGtk		拥有此视图的对象
	 * @param	$aUI=null		JCAT_UIGtkGlade		模版引擎
	 * @return	array
	 */
	public function DataVerifier_JCATBuildin_LengthView( JCAT_IViewContainer $aParent, JCAT_UIGtkGlade $aUI=null )
	{
		$this->JCAT_ViewGtk('DataVerifier_JCATBuildin_LengthView','DataVerifier_JCATBuildin_LengthView','DataVerifier_JCATBuildin_LengthView',$aParent,$aUI) ;
		
		
		// 创建 并 初始化 UICtrl ---------------------------
		$aUICtrl = new JCAT_UIGtkCtrlCheckbox('IgnoreMin',JCAT_Language::Sentence('不限'),'ChkIgnoreMin') ;
		$aUICtrl->SetActiveValue(1) ;
		$this->AddUICtrl($aUICtrl) ;

		$aUICtrl = new JCAT_UIGtkCtrlCheckbox('IgnoreMax',JCAT_Language::Sentence('不限'),'ChkIgnoreMax') ;
		$aUICtrl->SetActiveValue(1) ;
		$this->AddUICtrl($aUICtrl) ;

		$aUICtrl = new JCAT_UIGtkCtrlCheckbox('AllowEmpty',JCAT_Language::Sentence('允许为空'),'ChkAllowEmpty') ;
		$aUICtrl->SetActiveValue(1) ;
		$this->AddUICtrl($aUICtrl) ;
		
		$aUICtrl = new JCAT_UIGtkCtrlSText('Min',JCAT_Language::Sentence('最小长度'),'EntMin') ;
		$this->AddUICtrl($aUICtrl) ;
		
		$aUICtrl = new JCAT_UIGtkCtrlSText('Max',JCAT_Language::Sentence('最大长度'),'EntMax') ;
		$this->AddUICtrl($aUICtrl) ;
		
		// 设置数据交换
		$aDataExchanger = $this->GetDataExchanger() ;
		$aDataExchanger->LinkUICtrlToDocumentData('IgnoreMin','IgnoreMin') ;
		$aDataExchanger->LinkUICtrlToDocumentData('IgnoreMax','IgnoreMax') ;
		$aDataExchanger->LinkUICtrlToDocumentData('AllowEmpty','AllowEmpty') ;
		$aDataExchanger->LinkUICtrlToDocumentData('Min','Min') ;
		$aDataExchanger->LinkUICtrlToDocumentData('Max','Max') ;
	}

}

JCAT_Package::ImportInterface('JCAT_IViewForm',JCAT::PACKAGE_MVC) ;

?>